function [P, n, t] = AdamsMethodWithInitialStep(Fxy, y0, a, b, n, eps)
t0 = cputime();
n0 = n;
P1 = AdamsMethod(Fxy, y0, a, b, n0);
P0 = AdamsMethod(Fxy, y0, a, b, n0 * 2);
curr_eps = ComputeDeltaForPartialFunction(P1, P0);
while (curr_eps > eps)
    n0 = n0 * 2;
    P1 = P0;
    P0 = AdamsMethod(Fxy, y0, a, b, n0 * 2);
    curr_eps = ComputeDeltaForPartialFunction(P1, P0);
end;
P = P1;
n = n0;
t = cputime() - t0;
end

